package com.tjetc.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Examination implements Serializable {
    @Serial
    private static final long serialVersionUID = -7628779318343357294L;
    private Integer newbornId;

    private Double height;

    private Double weight;

    /**
    * white blood cell (WBC) 白细胞
    */
    private Double wbc;

    /**
    * red blood cell (RBC) 红细胞
    */
    private Double rbc;
    public double getElementByName(String name) {
        switch (name) {
            case "height":
                return height;
            case "weight":
                return weight;
            case "wbc":
                return wbc;
            case "rbc":
                return rbc;
            default:
                return 0;
        }
    }
}